import algorithm as al
import numpy as np
import math

P_1 = np.array([-108.45, 174.45, 0])
s_1 = np.array([-335.6, -77.27, 0])
Q_1 = np.array([227.15, 174.45, 0])
s_2 = np.array([335.6, -77.27, 0])
print(al.Coordinate().calCoordinateFrom2Lines(P_1, s_1, Q_1, s_2))

Point1 = np.array([-47.72, 0, 83])
Point2 = np.array([-47.72, 52.17, 83])
Point3 = np.array([35.89, 52.17, 83])
print(al.Plane().calPlaneEquationFrom3Points(Point1, Point2, Point3))
Point1 = np.array([35.89, 52.17, 0])
Point2 = np.array([-47.72, 0, 83])
Point3 = np.array([35.89, 26.27, 83])
print(al.Plane().calPlaneEquationFrom3Points(Point1, Point2, Point3))

Param_1 = np.array([0, 0, -4361.9337, 362040.4971])
Param_2 = np.array([-2180.41, 6939.63, 2165.499, -283785.5822])
print(al.Vector().calLineVictorFrom2Planes(Param_1, Param_2))